package io.github.uicdb.et;

import io.github.uicdb.et.selection.RandomSelection;
import net.minecraft.core.Holder;
import net.minecraft.world.entity.ai.attributes.AttributeModifier;
import net.minecraft.world.entity.ai.attributes.Attributes;
import net.neoforged.bus.api.IEventBus;
import net.neoforged.neoforge.registries.DeferredRegister;

public class ModRandomSelections {

    final static DeferredRegister<RandomSelection> register = DeferredRegister.create(ElementalTheory.RANDOM_SELECTION_REGISTRY, ElementalTheory.MODID);
    public static Holder<RandomSelection> EMPTY = register.register("empty", () -> new RandomSelection("empty",Attributes.SCALE, 0, AttributeModifier.Operation.ADD_VALUE));

    public static Holder<RandomSelection> DAMAGE = register.register("damage", () -> new RandomSelection("damage",Attributes.ATTACK_DAMAGE, 2, AttributeModifier.Operation.ADD_VALUE));
    public static Holder<RandomSelection> DAMAGE2 = register.register("damage2", () -> new RandomSelection("damage2",Attributes.ATTACK_DAMAGE, 0.05, AttributeModifier.Operation.ADD_MULTIPLIED_TOTAL));
    public static Holder<RandomSelection> HEALTH = register.register("health", () -> new RandomSelection("health",Attributes.MAX_HEALTH, 4, AttributeModifier.Operation.ADD_VALUE));
    public static Holder<RandomSelection> HEALTH2 = register.register("health2", () -> new RandomSelection("health2",Attributes.MAX_HEALTH, 0.1, AttributeModifier.Operation.ADD_MULTIPLIED_TOTAL));
    public static Holder<RandomSelection> SPEED = register.register("speed", () -> new RandomSelection("speed",Attributes.MOVEMENT_SPEED, 0.15, AttributeModifier.Operation.ADD_MULTIPLIED_TOTAL));
    public static Holder<RandomSelection> TOUGHNESS = register.register("toughness", () -> new RandomSelection("toughness",ModAttributes.TOUGHNESS, 5, AttributeModifier.Operation.ADD_VALUE));
    public static Holder<RandomSelection> ARMOR = register.register("armor", () -> new RandomSelection("armor",Attributes.ARMOR, 4, AttributeModifier.Operation.ADD_VALUE));
    public static Holder<RandomSelection> ARMOR2 = register.register("armor2", () -> new RandomSelection("armor2",Attributes.ARMOR, 0.11, AttributeModifier.Operation.ADD_MULTIPLIED_TOTAL));

    public static void init(IEventBus modEventBus) {
        register.register(modEventBus);
    }

}
